//
//  TDatePickerView.h
//  TDatePicker
//
//  ITUIHelper
//
//  Created by txj on 2017/3/23.
//  Copyright © 2017年 hs. All rights reserved.
//

//

#import <UIKit/UIKit.h>


/*使用方法
TAddressPickerView *adressV = [[TAddressPickerView alloc] initWithCompleteBlock:^(NSString *provinceCode, NSString *cityCode, NSString *countyCode, NSString *province, NSString *city, NSString *county) {
}];
adressV.addressPickerStyle=TAddressStyleShowProvenceCityDistrict;//必须在setAreasByAreaCode前面
[adressV setAreasByAreaCode:_user.region withAreaType:TAreaTypeProvence];
[adressV show];
*/
typedef enum{
    TAddressStyleShowProvence  = 0,
    TAddressStyleShowProvenceCity,
    TAddressStyleShowProvenceCityDistrict
    
}TAddressStyle;

typedef enum{
    TAreaTypeProvence  = 0,
    TAreaTypeCity,
    TAreaTypeDistrict
    
}TAreaType;

@interface TAddressPickerView : UIView

@property (nonatomic,assign)TAddressStyle addressPickerStyle;

@property (nonatomic,strong)UIColor *themeColor;
@property (nonatomic, retain) NSDate *maxLimitDate;//限制最大时间（没有设置默认2049）
@property (nonatomic, retain) NSDate *minLimitDate;//限制最小时间（没有设置默认1970）

-(instancetype)initWithCompleteBlock:(void(^)(NSString *provinceCode,NSString *cityCode,NSString *countyCode,NSString *province,NSString *city,NSString *county))completeBlock;

-(void)show;

-(void)setAreasByAreaCode:(NSString *)areacode withAreaType:(TAreaType)areaType;


@end
